                <!-- table -->
				<div class="box">
					<!-- box / title -->
					<div class="title">
						<h5>
                            <?=$title;?>
                            <?php 
                                if(isset($kurs['Value'])): 
                                    echo 'Kurs Pajak Rp. '.$kurs['Value'];
                                    $usdToidr = $kurs['Value'];
                                else:
                                    $usdToidr = 0;
                                endif;    
                             ?>
                            
                        </h5>
						<div class="search">
                        <?php  if(isset($kurs['Value'])):  ?>
                            <?=form_open('cashflow/bank/getSummaryBankExport')?>
								<div class="input">
                                    <label class="search"><?=lang('export')?></label>
									<?=form_dropdown('export',config('export'))?>
								</div>
								<div class="button">
									<?=form_submit('submit',lang('export'))?>
								</div>
							<?=form_close()?>
                        
                        <?php else:?>
                            <?=form_open('cashflow/bank/getSummaryBank')?>
								<div class="input">
                                    <?=form_dropdown('month',config('month'),$month)?>
                                    <?=form_dropdown('year',config('year'),$year)?>
								</div>
                                
								<div class="button">
									<input type="submit" name="submit" value="Search" />
								</div>
							<?=form_close()?>
                         <?php endif;?>   
						</div>
					</div>
					<!-- end box / title -->
					<div class="table">
                    
                        <?php if($this->session->flashdata('success')):?>
						<div id="message-success" class="message message-success">
							<div class="image">
								<img src="resources/images/icons/success.png" alt="Success" height="32" />
							</div>
							<div class="text">
								<h6>Send Email</h6>
								<span>Send Email Success to Recipient , to Edit email set to Settings Menu !</span>
							</div>
							<div class="dismiss">
									<a href="#message-success"></a>
							</div>
						</div>
						<?php elseif($this->session->flashdata('error')):?>
						<div id="message-error" class="message message-error">
								<div class="image">
									<img src="resources/images/icons/error.png" alt="Error" height="32" />
								</div>
								<div class="text">
									<h6>Send Email</h6>
									<span>Send Email Error to Recipient , to Edit email set to Settings Menu !</span>
								</div>
								<div class="dismiss">
									<a href="#message-error"></a>
								</div>
						</div>
						<?php endif;?>
                        
                        
                        <?php if(isset($kurs['Value'])):?>
                        <div class="action">
                            <?=anchor('cashflow/bank/getSummaryBankReset','Kembali Ke Awal');?>
			         	</div>
                        <?php endif;?>
                        
						<table>
							<thead>
								<tr>
									<th><?=lang('no')?></th>
                                    <th><?=lang('bank')?></th>
                                    <th><?=lang('account')?></th>
                                    <th><?=lang('currency')?></th>
                                    <th><?=lang('saldo')?></th>
								</tr>
                                
							</thead>
							<tbody>
                                <?php 
                                    $i=1;
                                    $usd = 0;
                                ?>
                                <?php foreach($accounts as $row): ?>
                                <?php $saldo = $this->accounts->getAccountSaldo($row['NoRekening'],$month,$year);?> 
                                <?php if(($row['MataUang']=='USD') && (isset($saldo['Saldo'])!=0) ):?>
                                <tr>
                                    <td style="width:2%;"><?=$i?></td>
                                    <td><?=$row['Branch']?></td>
                                    <td><p><?=$row['NoRekening']?></p></td>
                                    <th></th>
                                    <td class="right"><?=decimal($saldo['Saldo'],2)?></td>
                                </tr>
                                <?php 
                                        if(COUNT($saldo)) $usd_saldo = $saldo['Saldo']; else $usd_saldo=0; 
                                        $usd = $usd + $usd_saldo;
                                        $i++;
                                    endif;?>
                                <?php 
                                    
                                    endforeach;?>
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Total</th>
                                    <th class="right">USD</th>
                                    <th class="right"><?=decimal($usd,2)?></th>
                                </tr>
                                
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Kurs IDR</th>
                                    <th class="right">IDR</th>
                                    <th class="right"><?=decimal($idrVal = $usd * $usdToidr ,2)?></th>
                                </tr>
                                
                                <?php 
                                     $i=$i;
                                     $idr = 0;
                                ?>
                                <?php foreach($accounts as $row): ?>
                                <?php $saldo = $this->accounts->getAccountSaldo($row['NoRekening'],$month,$year);?> 
                                 <?php if(($row['MataUang']=='IDR') && (isset($saldo['Saldo'])!=0) ):?>
                                <tr>
                                    <td style="width:2%;"><?=$i?></td>
                                    <td><?=$row['Branch']?></td>
                                    <td><p><?=$row['NoRekening']?></p></td>
                                    <th></th>
                                    <td class="right"><?php if(COUNT($saldo)) echo decimal($saldo['Saldo'],2);?></td>
                                </tr>
                                <?php 
                                        if(COUNT($saldo)) $idr_saldo = $saldo['Saldo']; else $idr_saldo=0; 
                                        $idr = $idr + $idr_saldo;
                                        $i++;
                                    endif;?>
                                <?php 
                                    
                                    endforeach;?>
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Total</th>
                                    <th class="right">USD</th>
                                    <th class="right"><?=decimal($idr,2)?></th>
                                </tr>
							</tbody>
                            <tfoot>
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Total</th>
                                    <th class="right">IDR</th>
                                    <th class="right"><?=decimal($idr + $idrVal ,2)?></th>
                                </tr>
                            </tfoot>
						</table>
                        
                       <?php if(isset($kurs['Value'])):?>
                        <div class="action">
                            <?=anchor('cashflow/bank/getSummaryBankReset','Kembali Ke Awal');?>
			         	</div>
                        <?php endif;?>
                        
					</div>
				</div>
				<!-- end table -->